home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Modem / ARA Scripts Map / ARA CCL Scripts / MultiTechMultiModem1432 < prev    next >
Encoding:
Text File  |  1993-03-02  |  3.2 KB  |  196 lines  |  [mlts/slnk]

  1. ! "MultiTech MultiModem1432BA/BL/MU - 3/2/93"
  2. !
  3. @ORIGINATE
  4. @ANSWER
  5. !
  6. @LABEL 1
  7. serreset 19200, 0, 8, 1
  8. !
  9. ! first recall the factory configuration, and set the modem for 
  10. ! extended response codes and turn echo and baud adjust off.
  11. !
  12. settries 0
  13. matchclr
  14. matchstr 1 3 "OK\13\10"
  15. @LABEL 2
  16. write "AT&F&Q1X4E0$BA0\13"
  17. matchread 20
  18. inctries
  19. iftries 2 59
  20. ! Modem not responding, toggle DTR
  21. DTRClear
  22. pause 5
  23. DTRSet
  24. jump 2
  25. !
  26. ! Next, turn on CTS flow control, and disable Error Correction.
  27. !
  28. @LABEL 3
  29. matchstr 1 4 "OK\13\10"
  30. write "AT&D0&E0&E4\13"
  31. matchread 30
  32. jump 59
  33. !
  34. ! reduce transmit buffer size
  35. !
  36. @LABEL 4
  37. matchstr 1 5 "OK"
  38. write "AT&B1\13"
  39. matchread 30
  40. jump 59
  41. !
  42. ! Assuming that the modem speaker is on, if str 2 is "0" turn it off
  43. !
  44. @LABEL 5
  45. ifstr 2 8 "1"
  46. matchstr 1 8 "OK\13\10"
  47. write "ATM0\13"
  48. matchread 30
  49. jump 59
  50.  
  51. !
  52. ! The modem is ready so enable answering, or originate a call
  53. !
  54. @LABEL 8
  55. ifANSWER 30
  56. note "Dialing ^1" 3
  57. write "ATDT^1\13"
  58. !
  59. @LABEL 9
  60. matchstr 1 11 "CONNECT 1200\13\10"
  61. matchstr 2 12 "CONNECT 2400\13\10"
  62. matchstr 3 13 "CONNECT 4800\13\10"
  63. matchstr 4 19 "CONNECT 7200\13\10"
  64. matchstr 5 14 "CONNECT 9600\13\10"
  65. matchstr 6 20 "CONNECT 12000\13\10"
  66. matchstr 7 18 "CONNECT 14400\13\10"
  67. matchstr 8 50 "NO CARRIER\13\10"
  68. matchstr 9 50 "ERROR\13\10"
  69. matchstr 10 52 "NO DIALTONE\13\10"
  70. matchstr 11 53 "BUSY\13\10"
  71. matchstr 12 54 "NO ANSWER\13\10"
  72. matchread 700
  73. jump 59
  74. !
  75. @LABEL 11
  76. note "Communicating at 1200 bps." 2
  77. serreset 19200, 0, 8, 1
  78. !
  79. jump 15
  80. @LABEL 12
  81. note "Communicating at 2400 bps." 2
  82. serreset 19200, 0, 8, 1
  83. jump 15
  84. !
  85. @LABEL 13
  86. note "Communicating at 4800 bps." 2
  87. serreset 19200, 0, 8, 1
  88. jump 15
  89. !
  90. @LABEL 19
  91. note "Communicating at 7200 bps." 2
  92. serreset 19200, 0, 8, 1
  93. jump 15
  94. !
  95. @LABEL 14
  96. note "Communicating at 9600 bps." 2
  97. serreset 19200, 0, 8, 1
  98. jump 15
  99. !
  100. @LABEL 20
  101. note "Communicating at 12000 bps." 2
  102. serreset 19200, 0, 8, 1
  103. jump 15
  104. !
  105. @LABEL 18
  106. note "Communicating at 14400 bps." 2
  107. serreset 19200, 0, 8, 1
  108. @LABEL 15
  109. HSRESET 0 1 0 0 0 0
  110. ifANSWER 16
  111. pause 30
  112. @LABEL 16 
  113. exit 0
  114. !
  115. ! @ANSWER
  116. ! Set up the modem to answer
  117. @LABEL 30
  118. write "ATS0=1\13"
  119. matchstr 1 31 "OK\13\10"
  120. matchread 30
  121. jump 59
  122. !
  123. @LABEL 31
  124. matchstr 1  32 "RING\13\10"
  125. matchstr 2  11 "CONNECT 1200\13\10"
  126. matchstr 3  12 "CONNECT 2400\13\10"
  127. matchstr 4  13 "CONNECT 4800\13\10"
  128. matchstr 5  19 "CONNECT 7200\13\10"
  129. matchstr 6  14 "CONNECT 9600\13\10"
  130. matchstr 7  20 "CONNECT 12000\13\10"
  131. matchstr 8  18 "CONNECT 14400\13\10"
  132. matchstr 9  50 "NO CARRIER\13\10"
  133. matchstr 10 50 "ERROR\13\10"
  134. matchstr 11 52 "NO DIALTONE\13\10"
  135. matchstr 12 53 "BUSY\13\10"
  136. matchstr 13 54 "NO ANSWER\13\10"
  137. matchread 700
  138. jump 31
  139. !
  140. @LABEL 32
  141. userhook 1
  142. note "Answering phone…" 2
  143. jump 31
  144. !
  145. ! 50: error messages
  146. !
  147. @LABEL 50
  148. exit -6021
  149. !
  150. @LABEL 52
  151. exit -6020
  152. !
  153. @LABEL 53
  154. exit -6022
  155. !
  156. @LABEL 54
  157. exit -6023
  158. !
  159. @LABEL 59
  160. exit -6019
  161. !
  162. ! Hang up the modem
  163. !
  164. @HANGUP
  165. @LABEL 60
  166. settries 0
  167. @LABEL 61
  168. matchclr
  169. matchstr 1 62 "OK\13\10"
  170. matchstr 2 62 "NO CARRIER\13\10"
  171. matchstr 3 62 "ERROR\13\10"
  172. write "ATH\13"
  173. matchread 10
  174. inctries
  175. iftries 3 62
  176. ! no response, try escape sequence
  177. DTRClear
  178. pause 5
  179. DTRSet
  180. write "+++"
  181. matchclr
  182. matchstr 1 61 "OK\13\10"
  183. matchread 15
  184. jump 61
  185. !
  186. @LABEL 62
  187. ! set modem back to factory settings
  188. pause 5
  189. write "AT&F\13"
  190. matchclr
  191. matchstr 1 63 "OK\13\10"
  192. matchread 30
  193. !
  194. @LABEL 63
  195. exit 0
  196.